Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LogtailClient curl connection timeout and timeout #15

Merged
merged 7 commits into from
Mar 20, 2024

Conversation

vzikmund
Copy link
Contributor

Due to experience with occasionally slow Logtail endpoint, I decided to add connection timeout and timeout parameters to cURL settings. Timeouts are optional and set to 5 seconds by default - it should be enough for ordinary behaviour.

I wasn't able to run composer install because of composer.lock file, which was created with php8. My environment is running in php7.4 which sould be sufficient according to requirements in composer.json file. Therefore I removed unnecessarycomposer.lock file. I also added required ext-curl into the composer.json.

@vzikmund vzikmund mentioned this pull request Mar 18, 2024
@PetrHeinz
Copy link
Member

Hello @vzikmund, thank you for your contribution 🙌

Customizable timeouts definitely make sense to me and are an awesome addition for making logging more stable. I took the liberty of changing the unit from seconds to milliseconds (to allow finer control). Please take care when upgrading from your fork if you ended up changing the defaults in your application 🙏

I'll make sure to release the change in both 2.x and 3.x to keep things consistent.

@PetrHeinz PetrHeinz merged commit ad28932 into logtail:2.x Mar 20, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants